package utilities.event;

import List;
import Session;

import java.util.Date;

import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;

import utilities.Updatable;
import utilities.utilities_components.WorkerController;

public class WILListener implements EventListener{
	private WorkerController controller;
	private Updatable updateItem;
	
	public WILListener( WorkerController controller, Updatable updateItem ){
		this.controller = controller;
		this.updateItem = updateItem;
	}
	
	public void onEvent( Event event ){
		Date begin = controller.getBegin();
		if( begin != null ){
			Date end = controller.getEnd();
			
			updateItem.update( getData( begin, end, controller.getInChecker(), controller.getOutChecker() ), session );
		}
	}
	
	//"结账时间", "客人帐号", "主客", "房号", "客人类型", "现金消费", "签单消费", "其他消费", "总消费", "登记时间"
	//参数:begin起始时间,end截止时间,inChecher入账记录人,outChecker结账人
	private List getData( Date begin, Date end, String inChecker, String outChecker, Session session ){
		
	}
}
